<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <div id="app">
        <!-- {{ val }} -->
        <p>
            <!-- v-model 表单 -->
            账号: <input v-model="val" type="text">
        </p>
        <p>
            多选: <input v-model="flag"  type="checkbox">
        </p>
        <p>
            文本: <textarea v-model="textarea" name="" id="" cols="30" rows="10"></textarea>
        </p>
        <p>
            <select v-model="sel" name="" id="">
                <option value="aaa">选项1</option>
                <option value="bbb">选项2</option>
                <option value="ccc">选项3</option>
            </select>
        </p>
        <button @click="login">登录</button>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>

        new Vue({
            // 元素
            el: "#app",
            // 定义的数据(状态)
            data: {
                message: "数据",
                val: "1",
                flag: true,
                textarea: "",
                sel: ""
            },
            methods: {
                login() {
                    console.log(this.sel)
                }
            }
        })
    </script>
</body>
</html>